<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" pageEncoding="UTF-8"%>
<HTML>
	<HEAD>
		<meta http-equiv="Content-Language" content="zh-cn">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link href="${pageContext.request.contextPath}/css/Style.css" rel="stylesheet" type="text/css" />

	</HEAD>
	<body>
		<br>
		<form name="Form1" method="post"  action="${pageContext.request.contextPath}/studentServlet" id="Form1">

			<input type="hidden" name="method" value="findName">


			<table cellSpacing="1" cellPadding="0" width="100%" align="center" bgColor="#f5fafe" border="0">
				<TBODY>
					<tr>
						<td class="ta_01" align="center" bgColor="#afd1f3" height="40">
							<h2><strong>查 询 条 件</strong></h2>
						</td>
					</tr>
					<tr>
						<td>
							<table cellpadding="0" cellspacing="0" border="0" width="100%">
								<tr>
									<td height="22" align="center" bgColor="#f5fafe" class="ta_01">
										学生姓名
									</td>
									<td class="ta_01" bgColor="#ffffff">


										<input name="studentname"   class="bg" size="15"/>


									</td>
									<td height="22" align="center" bgColor="#f5fafe" class="ta_01">
										学生性别：
									</td>
									<td class="ta_01" bgColor="#ffffff">
										<select name="gender" id="gender">
											<option value="">--选择性别--</option>
											<option value="男">男</option>
											<option value="女">女</option>
										</select>
									</td>
								</tr>
								<tr>
									<td height="22" align="center" bgColor="#f5fafe" class="ta_01">
										专业：
									</td>
									<td class="ta_01" bgColor="#ffffff">
										<select name="major" id="major" >
											<option value="">--选择专业--</option>
											<option value="java">java</option>
											<option value="大数据">大数据</option>
											<option value="全栈">全栈</option>
											<option value="测试">测试</option>
											<option value="数媒">数媒</option>
										</select>
									</td>
									<td height="22" align="center" bgColor="#f5fafe" class="ta_01">
										是否上传头像
									</td>
									<td class="ta_01" bgColor="#ffffff">
										<select name="isUpload" id="isUpload" >
											<option value="">--请选择--</option>
											<option value="1">有</option>
											<option value="2">无</option>
										</select>
									</td>
								</tr>
								<tr>
									<td width="100" height="22" align="center" bgColor="#f5fafe"
										class="ta_01">
									</td>
									<td class="ta_01" bgColor="#ffffff">
										<font face="宋体" color="red"> &nbsp;</font>
									</td>
									<td align="right" bgColor="#ffffff" class="ta_01"><br><br></td>
									<td align="right" bgColor="#ffffff" class="ta_01">
										<input type="submit" id="search" name="search" value="查询" class="button_view" />
										&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										<input type="reset" id="reset" name="reset" value="重置" class="button_view" />
									</td>
								</tr>
							</table>
						</td>

					</tr>
					<tr>
						<td class="ta_01" align="center" bgColor="#afd1f3" height="40">
							<h2><strong>学 生 列 表</strong></h2>
						</TD>
					</tr>
					<tr>
						<td class="ta_01" align="right" >

							<h2><a name="add"  class="button_add" href="${pageContext.request.contextPath}/student/add.jsp" id="add">添加</a></h2>

						</td>
					</tr>
					<tr>
						<td class="ta_01" align="center" bgColor="#f5fafe">
							<table cellspacing="0" cellpadding="1" rules="all"
								bordercolor="gray" border="1" id="DataGrid1"
								style="BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; WIDTH: 100%; WORD-BREAK: break-all; BORDER-BOTTOM: gray 1px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #f5fafe; WORD-WRAP: break-word">
								<tr
									style="FONT-WEIGHT: bold; FONT-SIZE: 12pt; HEIGHT: 25px; BACKGROUND-COLOR: #afd1f3">

									<td align="center" width="18%">
										登录名
									</td>
									<td align="center" width="17%">
										学生姓名
									</td>
									<td align="center" width="8%">
										性别
									</td>
									<td align="center" width="23%">
										联系电话
									</td>
									<td width="11%" align="center">
										专业
									</td>
									<td width="7%" align="center">
										编辑
									</td>
									<td width="7%" align="center">
										查看
									</td>
									<td width="7%" align="center">
										删除
									</td>
								</tr>


								<c:if test="${not empty studentList}">

									<c:forEach items="${studentList}" var="student">

										<tr onmouseover="this.style.backgroundColor = 'white'"
											onmouseout="this.style.backgroundColor = '#F5FAFE';">
											<td style="CURSOR: hand; HEIGHT: 22px" align="center"
												width="18%">

												${student.loginname}

											</td>
											<td style="CURSOR: hand; HEIGHT: 22px" align="center"
												width="17%">

												${student.studentname}


											</td>
											<td style="CURSOR: hand; HEIGHT: 22px" align="center"
												width="8%">

												${student.gender}

											</td>
											<td style="CURSOR: hand; HEIGHT: 22px" align="center"
												width="23%">

												${student.telephone}


											</td>
											<td style="CURSOR: hand; HEIGHT: 22px" align="center">

													${student.major}

											</td>
											<td align="center" style="HEIGHT: 22px">
												<a href="${pageContext.request.contextPath}/studentServlet?method=edit&sid=${student.sid}">
													<img src="${pageContext.request.contextPath }/images/i_edit.gif" border="0" style="CURSOR: hand">
												</a>
											</td>
											<td align="center" style="HEIGHT: 22px">
												<a href="${pageContext.request.contextPath}/studentServlet?method=findStudentById&sid=${student.sid}">
													<img src="${pageContext.request.contextPath }/images/button_view.gif" border="0" style="CURSOR: hand">
												</a>
											</td>
											<td align="center" style="HEIGHT: 22px">
												<a href="${pageContext.request.contextPath}/studentServlet?method=delete&sid=${student.sid}">
													<img src="${pageContext.request.contextPath }/images/i_del.gif"  width="16" height="16" border="0" style="CURSOR: hand">
												</a>
											</td>
										</tr>

									</c:forEach>

								</c:if>







							</table>
						</td>
					</tr>
				</TBODY>
			</table>
		</form>
	</body>
</HTML>
